package com.newoffen.com.testcase;

import com.newoffen.com.check.ShopCheck;
import com.newoffen.com.driver.Driver;
import org.openqa.selenium.support.PageFactory;
import org.testng.annotations.Test;

public class ShopCase extends Driver {
    public String username = "18109045175";
    public String passwd = "123456";
    public String code="562378";
    /*
    登录
     */
    @Test(description = "门店登录",priority = 1)
    public  void checkShopLogin() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.shopLogin(ThreadDriver.get(),username,passwd,code);
    }
    @Test(description = "商品库列表",priority = 1)
    public  void checkGoodsList() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.goodsList(ThreadDriver.get());
    }
    @Test(description = "商品列表",priority = 1)
    public  void checkGoodsList1() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.goodsList1(ThreadDriver.get());
    }
    public String goodsName="";
    public String id="";
    public String supplier="";
    public String approval="";
    public String goodsType="非处方药";
    @Test(description = "商品搜索",priority = 1)
    public  void checkGoodsSearch() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.goodsSearch(ThreadDriver.get(),goodsName,id,supplier,approval,goodsType);
    }
    @Test(description = "自提订单列表",priority = 1)
    public  void checkPickOrder() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.pickUpOrderList(ThreadDriver.get());
    }
    public String type="订单编号";
    public String detail="S2021052451555748";
    public String payType="余额支付";
    @Test(description = "自提订单搜索",priority = 1)
    public  void checkOrderSearch() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.orderSearch(ThreadDriver.get(),type,detail,payType);
    }
    @Test(description = "同城订单列表",priority = 1)
    public  void checkLocalOrder() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.localOrderList(ThreadDriver.get());
    }
//    public String type="订单编号";
    public String detailL="S2021041250100975";
//    public String payType="余额支付";
    @Test(description = "同城订单搜索",priority = 1)
    public  void checkOrderSearchL() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.localOrderSearch(ThreadDriver.get(),type,detailL,payType);
    }
    @Test(description = "处方审核列表",priority = 1)
    public  void checkAudit() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.clickAudit(ThreadDriver.get());
    }
    public String idA="S2021052851101489";
    @Test(description = "同城订单搜索",priority = 1)
    public  void checkOrderSearchA() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.OrderSearch(ThreadDriver.get(),idA);
    }
    @Test(description = "售后维权列表",priority = 1)
    public  void checkAfterSale() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.clickAfterSale(ThreadDriver.get());
    }
    public String idS="R20210528505397986";
    @Test(description = "售后订单搜索",priority = 1)
    public  void AfterSaleSearch() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.AfterSaleSearch(ThreadDriver.get(),idS);
    }
    @Test(description = "提现管理列表",priority = 1)
    public  void checkManage() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.clickWithdraw(ThreadDriver.get());
    }
    @Test(description = "结算列表",priority = 1)
    public  void checkEntry() throws Exception{
        ShopCheck shopCheck = PageFactory.initElements(ThreadDriver.get(),ShopCheck.class);
        shopCheck.clickSettle(ThreadDriver.get());
    }




}
